package de.toolschmied.jjas.client.cms.actions;

import de.toolschmied.jjas.client.cms.actions.EditingToolbar.EditingListener;
import de.toolschmied.jjas.client.widgets.toolbar.Action;

public class SaveAction extends Action {

	private static final String NAME = "Save";
	private static final String TOOLTIP = "Save changes";
	private static final String IMAGE_URL = "images/save.png";
	
	private final EditingListener listener;
	
	public SaveAction(EditingListener listener) {
		super(NAME, TOOLTIP, IMAGE_URL, Type.PUSH);
		this.listener = listener;
	}

	@Override
	public void run() {
		listener.saveEditing();
	}

}
